<template src="./tpl.html"></template>

<script>
import {} from "_SERVICES/api";
import LogOut from "@/modules/CST/components/LogOut";
import TagsView from "@/modules/CST/components/TagsView";

import {initRouter,getStorage} from 'UTILS/util.js'

export default {
  name: "mainHtml",
  components: {
    "v-logout": LogOut,
    "v-tags-view": TagsView
  },
  watch: {},
  data() {
    return {
      isCollapse: false,  // 控制折叠状态
      list:[]
    };
  },
  created() {
    let userInfo = getStorage("cst_userInfo");
    if(userInfo){
      this.list = initRouter(JSON.parse(userInfo));
      // console.log("list 数据：",this.list)
    }
  },
  methods: {},
  computed:{
    isEnglish() {
      return this.$i18n.locale === 'en';
    }
  },
};
</script>

<style lang="less">
.main-html {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  .main-container {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    position: relative;
    .el-aside {
      height: 100%;
      position: fixed;
      font-size: 14px;
      top: 0;
      bottom: 0;
      left: 0;  
      z-index: 1001;
      overflow-x: hidden;
      background: #0a5897;
      .el-menu {
        border-right: none;
       
      }

      .el-menu-vertical-demo {
        width: 100%;
        box-sizing: border-box;
        
        .el-submenu {
          .el-menu-item {
            padding-left: 20px; 
          }
        }
        
        .el-submenu__title {
          font-weight: bold;  
          background-color: #0a5897; 
          padding: 10px; 
          display: flex;
          align-items: center
        }
      }
    }
    .main-box {
      min-height: 100%;
      margin-left: 200px;
      position: relative;
      .el-header {
        box-sizing: border-box;
        box-shadow: 0px 0px 10px #ccc;
        padding-top: 5px;
        padding-bottom: 5px;
        // height: 60px;
      }

      .logo {
        width: 180px;
      }
      .app-main {
        height: calc(100vh - 94px);
        position: relative;
        overflow: hidden;
        background: #efefef;
        padding: 5px;
        box-sizing: border-box;
      }
    }
  }
}
</style>
